package com.koron.css2.newProjectCenter.mapper;

import com.koron.css2.newProjectCenter.bean.PjMaterialCheckBean;
import com.koron.css2.newProjectCenter.bean.PjMaterialCheckDetailBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PjMaterialCheckMapper {
    @Insert("insert into pj_material_check(id, store_id, store_name, create_account, create_name, update_account, update_name) VALUE " +
            "(#{id} , #{storeId} , #{storeName} , #{createAccount} , #{createName} , #{updateAccount} , #{updateName})")
    void insert(PjMaterialCheckBean bean);

    void insertDetail(@Param("materialList") List<PjMaterialCheckDetailBean> materialList);

    List<PjMaterialCheckBean> getList(PjMaterialCheckBean bean);

    @Select("select * from pj_material_check_list where check_id = #{checkId} ")
    List<PjMaterialCheckDetailBean> getMaterialListByCheckId(@Param("checkId") String checkId);
}
